package com.myframework.smhj.hibernate.dialect;

import java.sql.Types;

import org.hibernate.dialect.Oracle10gDialect;

public class MyOracle11gDialect extends Oracle10gDialect {

	public MyOracle11gDialect() {
		super();
		registerHibernateTypeMappings();
		registerNumericTypeMappings();
		
	}
	
	protected void registerHibernateTypeMappings() {
		registerHibernateType(Types.INTEGER, "int");
	}
	
	protected void registerNumericTypeMappings() {
		registerColumnType( Types.INTEGER, "integer" );
		
		registerColumnType( Types.BIT, "number(1)" );
		registerColumnType( Types.BOOLEAN, "number(1)" );
		registerColumnType( Types.TINYINT, "number(3)" );
		registerColumnType( Types.SMALLINT, "number(5)" );
		registerColumnType( Types.INTEGER, "number(10)" );
		registerColumnType( Types.BIGINT, "number(19)" );
		
		registerColumnType( Types.FLOAT, "float" );
		registerColumnType( Types.DOUBLE, "double precision" );
		registerColumnType( Types.NUMERIC, "number($p,$s)" );
		registerColumnType( Types.DECIMAL, "number($p,$s)" );

        
        
        
	}
}
